<template>
  <div class="nave">
    <van-nav-bar class="hmttNav">
      <template #left>
        <i class="iconfont icon-fanhui icon" @click="$router.push(path)"></i>
      </template>
      <template #title>
        <h4 class="title">{{ title }}</h4>
      </template>
      <template #right>
        <span class="baocun" v-if="storage" @click="baoCunBtn">保存</span>
      </template>
    </van-nav-bar>
  </div>
</template>
<script>
export default {
  props: ['title', 'path', 'storage'],
  methods: {
    baoCunBtn () {
      this.$emit('baoCunBtn')
    }
  }
}
</script>
<style lang="less" scoped>
.nave {
  .hmttNav {
    background-color: #3e9df8;
    ::v-deep .van-nav-bar__left {
      padding-left: 8px;
    }
    .icon {
      font-size: 26px;
      color: #fff;
    }
    .title {
      color: white;
    }
    .baocun {
      color: white;
    }
  }
}
</style>
